Filter internal backlog entries from search#81
Conversation
Filter search index entries that expose internal blog backlog pages through the public command palette. Add a regression test covering Private-ToDo and 0_ToDo URLs so future search_db refreshes do not resurface those links.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6fa4b7bdc9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Filters internal backlog entries (e.g., Private-ToDo / 0_ToDo) out of the client-side search database before Fuse.js is initialized, preventing accidental exposure via public search results.
Changes:
- Add client-side sanitization in
SearchManager.loadSearchDatabase()to remove internal backlog entries. - Add a Jest regression test to ensure internal backlog URLs are excluded from loaded search data.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| assets/js/search-manager.js | Adds pattern-based filtering of internal backlog entries during search DB load. |
| tests/search-manager.test.js | Adds a regression test asserting internal backlog entries are removed. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Private-ToDoand0_ToDosearch entries before Fuse initializationEvidence
fcfcf1b5563251037b48e05019bbb8019690aef9updated onlyassets/js/search_db.jsonhttps://blogs.comphy-lab.org/Private-ToDo-Blog-public/andhttps://blogs.comphy-lab.org/0_ToDo-Blog-public/assets/js/search-manager.jspreviously loaded the raw JSON without any client-side filteringValidation
npm test -- search-manager.test.js --runInBandnpm test -- command-palette-stale-search.test.js --runInBandnpx eslint assets/js/search-manager.js tests/search-manager.test.js